package com.Abstract;

/**
 * @Author 小闽
 * @Date 2024/9/11 14:39
 * @PackageName: com.Abstract
 * @ClassName: Employee
 * @Description: 员工类
 * @Version 1.0
 */
public abstract class Employee {
    private String name;
    private int id;
    private double salary;

    /**
     * 构造方法
     * @param name
     * @param id
     * @param salary
     */
    public Employee(String name, int id, double salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }

    /**
     * 抽象方法
     * @return
     */
    public abstract void work();
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
